#ifndef OPENDX_H
#define OPENDX_H

#include <plib.h>
#include "matchingdata.h"

#define DIM 2

typedef struct pos {
  float x;
  float y;
  float z;
} pos;

typedef struct dxctrl {
  int tool;
  int dim;
  char* basename;
  char* coordsfile;

  PlotGraphType* graph;
  PlotGridType* grid;
  pos* coordinates;

  /* one dx file many plots into one group*/
  int g;
  int obj;
  char** gnames;
  char** infos1;
  char** infos2;
  char** infos3;
  FILE* f;
}DxCtrl;
int DX_refinement(Graph *g,char* resultbase, char* coordsfile,int id
		  ,double* cutedge,double* imbalance, double* met);
int DX_matching(Graph *g,char *filename, char* coordsfile);

#endif
